<html>
<head>
  <title></title>
  <link rel="stylesheet" href="docs.css" type="text/css"/>
</head>
<body>
<h1 class="heading">Localization</h1>
<br />

<h3 class="heading">RESOURCE token</h3>
<div class="comment">On startup all files in <span style="font-weight:bold" title="Location where the current AOS root directory is configured at startup">aos_root</span>/conf/resources/ are lodead, filenames are <i>locale</i>.xml  (e.g.  en-us.xml, ru-ru.xml, etc).
For a given locale (determined by Session override or Accept-Languages: HTTP header) the resource is looked up and content is emitted.</div><br />
<br />

<b class="code">%[RESOURCE]{{{xml_path}}}[RESOURCE]%</b><br />
<br />
<h5 class="heading">Example</h5>
Assuming HTTP request has:<br />
Accept-Languages: en-pirate<br />
<br />
and<br />
<br />
<span style="font-weight:bold" title="Location where the current AOS root directory is configured at startup">aos_root</span>/conf/resources/en-pirate.xml is as follows:<br />
<br />
<xmp class="code_xml"><resource>
  <message>Arrr!</message>
</resource></xmp>
<br />
then the template token evaluates to:<br />
<br />
%[RESOURCE]{{{/resource/message}}}[RESOURCE]% = <b>Arrr!</b><br />
<br />
If you provide a locale specific XML resource collection for each language then when it changes the correct one will be used when template is output.  This is in addition to the locale specific content <a href="config_locale.html">provided</a>.
</body>
</html>
